# 获取api包中login文件的login和use_test函数
from api.login import login
from api.login import use_test

# 新建列表
login_data = [
{"username": "13488888888", "password": "123456"},
{"username": "", "password": "123456"},
{"username": "13800000001", "password": ""},
{"username": "13800000001", "password": "123"}
]


for i in login_data:
    login(i.get("username"), i.get("password"))#调用login函数

    if i.get("username") == "13488888888":
        assert "账号正确" == use_test(i.get("username"))#调用use_test函数并进行断言
    else:
        assert "账号错误" == use_test(i.get("username"))





